home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Commodities / SwitchWindow / SwitchWindow.rexx.doc < prev    next >
Text File  |  1996-09-26  |  12KB  |  344 lines

  1. ================== SwitchWindow 0.8 REXX port documentation ===============
  2. ===========================================================================
  3. A  simple  window  tool  as  a replacement for  CBM IHelp  to be used  with
  4.  Kickstart 2.x/3.x, written by  Roland 'Gizzy' Mainz,  freeware, all rights
  5.  reserved.
  6. No guarantee of any kind is made  that  the program described below in this
  7.  document is 100% reliable. You use this material on your own risk.
  8.  
  9.  
  10. ============================ Misc =========================================
  11. ===========================================================================
  12. I've thougt of the ways to control a very simple and flexible tool.
  13. A window was the first abylity, but there was no way to connect
  14. several functions.
  15. A config file with an internal script language, was the second, but I
  16. wants to change an option at runtime.
  17. REXX, release with V2.04 of the OS, was the third way, includes the
  18. features of the previous abylities.
  19.  
  20.  
  21. ===================== Changing hotkeys via runtime ========================
  22. ===========================================================================
  23. Every hotkey of SwitchWindow is controlled from the Commodities Network.
  24. SwitchWindow has the feature to change any hotkey description and enable
  25. or disable seperate hotkeys.
  26.  
  27. RULES
  28.   <command> specifies the command like 'MOVELEFT', 'SIZEPAGEUP'
  29.             or 'WINDOWTOMOUSE'.
  30.  
  31.   <command>KEY  --> is the command to change the hotkey status
  32.                     examples:
  33.                       MOVELEFT --> 'MOVELEFTKEY=ENABLED'
  34.                                      /* enables the hotkey */
  35.                                    'MOVELEFTKEY=DISABLED'
  36.                                      /* disables the hotkey */
  37.                                    'MOVELEFTKEY=lcommand left'
  38.                                      /* change the hotkey description */
  39.   NOTE:
  40.   If the changing of the hotkey description failed, the old value will be
  41.   the active one.
  42.  
  43.  
  44. =========================== REXX commands =================================
  45. ===========================================================================
  46.  
  47. CX_DISABLED/K.... This is a boolean switch which determines whether
  48.                   SwitchWindow's hotkeys are disabled or not.
  49.                   example: 'CX_DISABLED'       --> disable
  50.                            'CX_DISABLED=TRUE'  --> disable
  51.                            'CX_DISABLED=YES'   --> disable
  52.                            'CX_DISABLED=FALSE' --> enable
  53.  
  54.  
  55. ZIPWINDOW,
  56. ZIPWINDOWKEY/K/A. 'zip' the window. This function is similar to the
  57.                   window's 'ZOOM'-gadget.
  58.                   example: 'ZIPWINDOW'
  59.                            'ZIPWINDOWKEY=lcommand z'
  60.  
  61. MAKESMALL,
  62. MAKESMALLKEY/K/A. Makes the window as small as possible.
  63.                   example: 'MAKESMALL'
  64.                            'MAKESMALLKEY=lcommand tab'
  65.  
  66. MAKEBIG,
  67. MAKEBIGKEY/K/A... Makes the window as big as possible.
  68.                   example: 'MAKEBIG'
  69.                            'MAKEBIGKEY=shift lcommand tab'
  70.  
  71. CLIPTOWINDOW,
  72. CLIPTOWINDOWKEY/K/A
  73.                   Move the visible part of a draggable screen to the
  74.                   window's position.
  75.                   example: 'CLIPTOWINDOW'
  76.                            'CLIPTOWINDOWKEY=lcommand w'
  77.  
  78. WINDOWTOCLIP,
  79. WINDOWTOCLIPKEY/K/A
  80.                   Change the window's position to the visible part of
  81.                   the screen (screenclip).
  82.                            'WINDOWTOCLIP'
  83.                   example: 'WINDOWTOCLIPKEY=lcommand c' (DEFAULT)
  84. MOVEUP
  85. MOVEDOWN
  86. MOVERIGHT
  87. MOVELEFT
  88. MOVEUPKEY/K/A
  89. MOVEDOWNKEY/K/A
  90. MOVERIGHTKEY/K/A
  91. MOVELEFTKEY/K/A.. Moves the window in the specified direction in
  92.                   the MOVESTEP value.
  93.                   examples:
  94.                     'MOVEUP'
  95.                     'MOVEDOWN'
  96.                     'MOVERIGHT'
  97.                     'MOVELEFT'
  98.                     'MOVEUPKEY=lcommand up'
  99.                     'MOVEDOWNKEY=lcommand down'
  100.                     'MOVERIGHTKEY=lcommand right '
  101.                     'MOVELEFTKEY=lcommand left'
  102.  
  103. SIZEUP
  104. SIZEDOWN
  105. SIZERIGHT
  106. SIZELEFT
  107. SIZEUPKEY/K/A
  108. SIZEDOWNKEY/K/A
  109. SIZERIGHTKEY/K/A
  110. SIZELEFTKEY/K/A.. Sizes the window in the specified direction.
  111.                   examples:
  112.                     'SIZEUP'
  113.                     'SIZEDOWN'
  114.                     'SIZERIGHT'
  115.                     'SIZELEFT'
  116.                     'SIZEUPKEY=shift lcommand up'
  117.                     'SIZEDOWNKEY=shift lcommand down'
  118.                     'SIZERIGHTKEY=shift lcommand right'
  119.                     'SIZELEFTKEY=shift lcommand left'
  120.  
  121. PAGEUP
  122. PAGEDOWN
  123. PAGEUPKEY/K/A
  124. PAGEDOWNKEY/K/A.. Moves the window up (down) in the window's frame height.
  125.                   examples:'PAGEUP'
  126.                            'PAGEDOWN'
  127.                            'PAGEUPKEY=lcommand numericpad 9'
  128.                            'PAGEDOWNKEY=lcommand numericpad 3'
  129.  
  130. SIZEPAGEUP
  131. SIZEPAGEDOWN
  132. SIZEPAGEUPKEY/K/A
  133. SIZEPAGEDOWNKEY/K/A
  134.                   Size the window up (or down) in the current window's
  135.                   frame height.
  136.                   examples:
  137.                     'SIZEPAGEUP'
  138.                     'SIZEPAGEDOWN'
  139.                     'SIZEPAGEUPKEY=shift lcommand numericpad 9'
  140.                     'SIZEPAGEDOWNKEY=shift lcommand numericpad 3'
  141.  
  142. WINDOWTOMOUSE
  143. WINDOWTOMOUSEKEY/K/A
  144.                   Moves the window's left top edge to the mousepointes's
  145.                   position.
  146.                   example: 'WINDOWTOMOUSE'
  147.                            'WINDOWTOMOUSEKEY=lcommand numericpad 0'
  148.  
  149. WINDOWTOFRONT
  150. WINDOWTOFRONTKEY/K/A
  151.                   The keys to press to bring the window in front of all
  152.                   other windows in the screen.
  153.                   example: 'WINDOWTOFRONT'
  154.                            'WINDOWTOFRONTKEY=lcommand f'
  155.  
  156. WINDOWTOBACK
  157. WINDOWTOBACKKEY/K/A
  158.                   The keys to press to send the window in back of all
  159.                   other windows in the screen.
  160.                   example: 'WINDOWTOBACK'
  161.                            'WINDOWTOBACKKEY=lcommand b'
  162.  
  163. DEBIGWINDOW
  164. DEBUGWINDOWKEY/K/A
  165.                   The keys to press to create a requester with some
  166.                   informations about the window (like name, width,
  167.                   height, leftedge, topedge ... )
  168.                   example: 'DEBUGWINDOW'
  169.                            'DEBUGWINDOWKEY=lcommand d'
  170.  
  171. MOVESTEP/N/A..... The number of pixels in the screen's resolution to move
  172.                   the window in every direction.
  173.                   example: 'MOVESTEP=20'
  174.  
  175. SIZESTEP/N/A..... The number of pixels in the screen's resolution to size
  176.                   the window in every direction.
  177.                   example: 'SIZESTEP=20'
  178.  
  179. CHANGEWINDOWBOX/K/A
  180.                   SYNOPSIS
  181.                     CHANGEWINDOWBOX=<var>
  182.  
  183.                   FUNCTION
  184.                     Change the window's box (frame) in position and
  185.                     dimensions in absolute (not relative) coordinates.
  186.  
  187.                   INPUTS
  188.                     <var>.LEFT    = left edge of the new window's frame
  189.                     <var>.TOP     = top edge
  190.                     <var>.WIDTH   = width
  191.                     <var>.HEIGHT  = height
  192.  
  193.                   RESULTS
  194.                     Results nothing.
  195.  
  196.                   BUGS
  197.  
  198.                   EXAMPLE
  199.                     /* ChangeWindowBox.REXX */
  200.                     address 'SwitchWindowRXPort'
  201.  
  202.                     BOX.LEFT = 0       /* leftedge */
  203.                     BOX.TOP  = 0       /* topedge  */
  204.                     BOX.WIDTH = 640    /* width    */
  205.                     BOX.HEIGHT = 100   /* height   */
  206.  
  207.                     'CHANGEWINDOWBOX=BOX' /* call the function */
  208.  
  209.  
  210. GETWINDOW/K/A -- experimental -- do not use --
  211.  
  212. WINDOW/K/A
  213.                   SYNOPSIS
  214.                     WINDOW=<windowname>
  215.  
  216.                   FUNCTION
  217.                     Specifies the new targed window for every
  218.                     SwitchWindow function called from REXX.
  219.                     If the windowname is not valid, the activewindow
  220.                     will be get.
  221.  
  222.  
  223.                   INPUTS
  224.                     <windowname> = the name of the window that
  225.                                    may be activated.
  226.  
  227.                   RESULTS
  228.                     Returns nothing.
  229.  
  230.                   BUGS
  231.                     Does not fail if the window wasn't found.
  232.                     Today this function need the full name.
  233.                     In later versions of SwitchWindow (>V0.85)
  234.                     pattern matching may be allowed.
  235.  
  236.                   EXAMPLE
  237.                     /* Select other window.rexx */
  238.                     address 'SwitchWindowRXPort'
  239.  
  240.                     'WINDOW=Tools'
  241.                     moveup
  242.                     moveleft
  243.                     movedown
  244.                     moveright
  245.                     zipwindow
  246.                     'WINDOW=xyzxx' /* select a non existing window
  247.                                       that the next script
  248.                                       get the standart activewindow */
  249.  
  250.  
  251. ACTIVATEWINDOW/K/A
  252.                   SYNOPSIS
  253.                     ACTIVATEWINDOW=<windowname>
  254.  
  255.                   FUNCTION
  256.                     Activates a window.
  257.  
  258.                   INPUTS
  259.                     <windowname> = the name of the window that
  260.                                    may be activated.
  261.  
  262.                   RESULTS
  263.                     Results nothing.
  264.  
  265.                   BUGS
  266.                     Today this function need the full name.
  267.                     In later versions of SwitchWindow (>V0.85)
  268.                     pattern matching may be allowed.
  269.  
  270.                   EXAMPLE
  271.                     'ACTIVATEWINDOW=Tools'
  272.  
  273.  
  274. QUIT
  275.                   SYNOPSIS
  276.                     QUIT
  277.  
  278.                   FUNCTION
  279.                     Quit the tool.
  280.  
  281.                   INPUTS
  282.                     Gets nothing.
  283.  
  284.                   RESULTS
  285.                     Results nothing.
  286.  
  287.  
  288. ================================ TODO =====================================
  289. ===========================================================================
  290. -update the REXX port
  291. -more REXX commands
  292.   ASYNC             - asycronous REXX mode
  293.   SYNC              - syncronous REXX mode
  294.   ENABLE            - enables the tool
  295.   DISABLE           - disable the tool
  296.   QUIET             - same as QUIET tooltype
  297.   KILL              - same as QUIT command
  298.   IGNORESIZEFLAG    - same as IGNORESIZEFLAG tooltype
  299.   INITREXX          - init the REXX port
  300.   RESET             - reset the tool
  301.   DELAY / WAIT      - wait a specified time
  302.   STATUS            - return the current SwitchWindow status
  303. -some demo scripts
  304. -Make GETWINDOW useable
  305. -add pattern matching for every window naming
  306. -select a window through it's address
  307. -a better REXX error report
  308. -a simple, short manual file (autodoc style)
  309.  
  310.  
  311. =========================== Author's Request ==============================
  312. ===========================================================================
  313. By  releasing  this program I do  not  place any obligations on you,
  314. feel free to share this program with your  friends (and enemies).
  315.  
  316. If you want to blame me, report any bugs or want the source,
  317. send your letter to:
  318.                 Roland Mainz
  319.                 Hohenstaufenstraße 8
  320.                 D-5164 Nörvenich
  321.                 GERMANY
  322.  
  323. But, should you feel the need to make any contributions, send them to:
  324.                 Fred Fish
  325.                 Amiga Library Disks
  326.                 1835 East Belmont Drive
  327.                 Tempe, Arizona  85284
  328.                 USA
  329.  
  330. for his great AMIGA library, and his work all over the years.
  331.  
  332.  
  333. The entire  SwitchWindow  package  may  be  noncommercially redistributed,
  334. provided  that  the package  is always  distributed in it's complete  form
  335. (including it's documentation).  A small copy fee  for media costs is okay
  336. but any kind of commercial distribution is strictly forbidden!
  337. Comments  and  suggestions  how  to  improve  this  program  are generally
  338. appreciated!
  339.  
  340. Thanks to Matt Dillon for his DICE, and Olaf 'Olsen' Barthel for his
  341. help, ideas and some text clips from his documentations.
  342.  
  343.  
  344.